package com.neusoft.demo7;

import com.neusoft.demo6.Employee;

import java.io.BufferedReader;
import java.io.FileDescriptor;
import java.io.FileReader;
import java.io.InputStreamReader;

public class Test {
    public void m1(int a) {

    }
    public int m2(int a) {
        return a;
    }
    public void m3(int[] a) {

    }
    public int[] m4(int[] a) {
        return a;
    }
    public void m5(Employee employee) {
        System.out.println(employee.getName());
    }
    public Employee m6(Employee employee) {
        return employee;
    }

    public Pet m8(Pet pet) { //Dog
        pet.setHealth(90);
        pet.setLove(90);
        return pet; //Dog
    }
    public void m7(Pet pet) {
        System.out.println(pet.getHealth());
    }
    public static void main(String[] args) {
        Test test = new Test();
        Pet pet = new Dog();
        pet.setName("tom");
        pet.setHealth(90);
        Pet p = test.m8(pet);
        System.out.println(p.getName() + " " + p.getHealth() + " " + p.getLove());
        System.out.println("--------------------------------------------");
        test.m7(pet);
        System.out.println("--------------------------------------------");
        Employee employee = new Employee();
        employee.setName("tom");
        Employee employee1 = test.m6(employee);
        System.out.println(employee1.getName());
        System.out.println("--------------------------------------------");

//       Pet[] pets = new Pet[2];
//       pets[0] = new Dog();
//       pets[1] = new Penguin();
    }
}
